<script setup lang="ts">
import { onMounted, ref } from 'vue'
import { addBox, initView } from './ts/map';

const viewer = ref()
const CesiumContent = ref()

onMounted(() => {
  viewer.value = initView(CesiumContent.value)
})

const addNewBox = () => {
  addBox(viewer.value)
}
</script>

<template>
  <div class="cesium-wrap" ref="CesiumContent"></div>
  <button @click="addNewBox">添加xinBox</button>
</template>

<style scoped lang="scss">
.cesium-wrap {
  width: 100%;
  height: 100%;
  border: 1px solid red;
}
</style>